<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="application/javascript" charset="utf-8">
        /**
         * js中的数组类似java中的map容器，长度可随意改变，元素类型任意
         */
        var arr = new Array();
        var arr1 = [1,2,3,4,true,'abc',new Date()];
        alert(arr1.length);
        alert(arr1);
        arr1.length = 5;
        alert(arr1);
        alert(arr1.toString());
    </script>
</head>
<body>
</body>
</html>